<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <div style="width: 600px;height: 600px;border: 1px solid grey">
        <div id="div1" style="margin: 100px; height: 300px;background-color: aquamarine">123</div>
    </div>
    <script>
        document.querySelector('#div1').addEventListener('click', event=>{
            console.log(event.offsetX, event.offsetY);
            console.log(event.x, event.y);
            console.log(event.clientX, event.clientY);
            let rect = event.target.getBoundingClientRect();
            console.log(rect.top, rect.bottom, rect.left, rect.right);
            console.log(event.target.offsetWidth, event.target.offsetHeight);
        })
    </script>
</body>

</html>